package com.rongke.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * @Coupon
 * @优惠券(coupon)
 * @version : Ver 1.0
 */
@TableName("coupon")
public class Coupon implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:优惠券id
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:优惠券名称
	 * @字段:title VARCHAR(50)
	 */
	private String title;


	/**
	 * @备注:优惠显示名称（如“满199减20”、“无门槛10元”等）
	 * @字段:display_name VARCHAR(50)
	 */
	private String displayName;


	/**
	 * @备注:优惠券类型（1 无门槛抵扣 2 满减）
	 * @字段:type INT(10)
	 */
	private Integer type;


	/**
	 * @备注:达到满减条件金额（满XX元可用）
	 * @字段:reach_amount DOUBLE(5)
	 */
	private Double reachAmount;


	/**
	 * @备注:优惠券面值
	 * @字段:denomination INT(10)
	 */
	private Integer denomination;


	/**
	 * @备注:用户使用限制（1 全部会员可用 2 彩虹会员可用）默认全部可用
	 * @字段:limit_member INT(10)
	 */
	private Integer limitMember;


	/**
	 * @备注:有效期持续时间（多少天内有效）
	 * @字段:validity_days INT(10)
	 */
	private Integer validityDays;


	/**
	 * @备注:有效期到期时间
	 * @字段:expire_time DATE(10)
	 */
	@JsonSerialize(using = DateJsonSerializer.class)
	@JsonDeserialize(using = DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private java.util.Date expireTime;


	/**
	 * @备注:优惠券发放标识（1 普通优惠券 2 注册自动发放 3 普通分享（给好友等） 4 优质分享（到朋友圈等）  5……）
	 * @字段:diff_tag INT(10)
	 */
	private Integer diffTag;


	/**
	 * @备注:获取时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime;


	public Coupon(){
	}

	public Coupon(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}


	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return this.title;
	}


	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getDisplayName() {
		return this.displayName;
	}


	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getType() {
		return this.type;
	}


	public void setReachAmount(Double reachAmount) {
		this.reachAmount = reachAmount;
	}

	public Double getReachAmount() {
		return this.reachAmount;
	}


	public void setDenomination(Integer denomination) {
		this.denomination = denomination;
	}

	public Integer getDenomination() {
		return this.denomination;
	}


	public void setLimitMember(Integer limitMember) {
		this.limitMember = limitMember;
	}

	public Integer getLimitMember() {
		return this.limitMember;
	}


	public void setValidityDays(Integer validityDays) {
		this.validityDays = validityDays;
	}

	public Integer getValidityDays() {
		return this.validityDays;
	}


	public void setExpireTime(java.util.Date expireTime) {
		this.expireTime = expireTime;
	}

	public java.util.Date getExpireTime() {
		return this.expireTime;
	}


	public void setDiffTag(Integer diffTag) {
		this.diffTag = diffTag;
	}

	public Integer getDiffTag() {
		return this.diffTag;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}
}
